<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: BancoController</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">BancoController</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/app/controllers/banco_controller_rb.html">
                app/controllers/banco_controller.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="ApplicationController.html">
                ApplicationController
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000127">cancelarAtualizacaoBdCert</a>&nbsp;&nbsp;
      <a href="#M000132">cancelarAtualizacaoBdProd</a>&nbsp;&nbsp;
      <a href="#M000129">concluirAtualizacaoBdCert</a>&nbsp;&nbsp;
      <a href="#M000133">concluirAtulizacaoBdProd</a>&nbsp;&nbsp;
      <a href="#M000124">home</a>&nbsp;&nbsp;
      <a href="#M000122">index</a>&nbsp;&nbsp;
      <a href="#M000126">iniciarAtualizacaoBdCert</a>&nbsp;&nbsp;
      <a href="#M000130">iniciarAtualizacaoBdProd</a>&nbsp;&nbsp;
      <a href="#M000123">show</a>&nbsp;&nbsp;
      <a href="#M000128">suspenderAtualizacaoBdCert</a>&nbsp;&nbsp;
      <a href="#M000131">suspenderAtualizacaoBdProd</a>&nbsp;&nbsp;
      <a href="#M000125">ultimas_req</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000127" class="method-detail">
        <a name="M000127"></a>

        <div class="method-heading">
          <a href="#M000127" class="method-signature">
          <span class="method-name">cancelarAtualizacaoBdCert</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
O administrador de dados cancela a atualização do banco.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000127-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000127-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/banco_controller.rb, line 44</span>
44:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cancelarAtualizacaoBdCert</span>
45:     <span class="ruby-identifier">historico</span> = <span class="ruby-constant">Historico</span>.<span class="ruby-identifier">new</span>
46:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">attributes</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:historico</span>]
47:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">usuario_id</span> = <span class="ruby-constant">Goldberg</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>
48:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">historico</span>.<span class="ruby-identifier">requisicao_id</span>)
49:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">cancelarAtualizacaoBdCert!</span>
50:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">estado</span> = <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">estado</span>
51:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">historicos</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">historico</span>
52:     <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-value str">'Operação realizada com sucesso.'</span>        
53:     <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'home'</span>
54:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000132" class="method-detail">
        <a name="M000132"></a>

        <div class="method-heading">
          <a href="#M000132" class="method-signature">
          <span class="method-name">cancelarAtualizacaoBdProd</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000132-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000132-source">
<pre>
     <span class="ruby-comment cmt"># File app/controllers/banco_controller.rb, line 103</span>
103:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cancelarAtualizacaoBdProd</span>
104:     <span class="ruby-identifier">historico</span> = <span class="ruby-constant">Historico</span>.<span class="ruby-identifier">new</span>
105:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">attributes</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:historico</span>]
106:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">usuario_id</span> = <span class="ruby-constant">Goldberg</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>
107:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">historico</span>.<span class="ruby-identifier">requisicao_id</span>)
108:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">cancelarAtualizacaoBdProd!</span>
109:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">estado</span> = <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">estado</span>
110:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">historicos</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">historico</span>
111:     <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-value str">'Operação realizada com sucesso.'</span>        
112:     <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'home'</span>
113:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000129" class="method-detail">
        <a name="M000129"></a>

        <div class="method-heading">
          <a href="#M000129" class="method-signature">
          <span class="method-name">concluirAtualizacaoBdCert</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000129-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000129-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/banco_controller.rb, line 67</span>
67:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">concluirAtualizacaoBdCert</span>
68:     <span class="ruby-identifier">historico</span> = <span class="ruby-constant">Historico</span>.<span class="ruby-identifier">new</span>
69:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">attributes</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:historico</span>]
70:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">usuario_id</span> = <span class="ruby-constant">Goldberg</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>
71:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">historico</span>.<span class="ruby-identifier">requisicao_id</span>)
72:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">concluirAtualizacaoBdCert!</span>
73:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">estado</span> = <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">estado</span>
74:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">historicos</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">historico</span>
75:     <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-value str">'Operação realizada com sucesso.'</span>        
76:     <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'home'</span>
77:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000133" class="method-detail">
        <a name="M000133"></a>

        <div class="method-heading">
          <a href="#M000133" class="method-signature">
          <span class="method-name">concluirAtulizacaoBdProd</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Ao concluir atualização de banco em produção o requisição toma seu
rumo seguindo alguns fatores. se ouver umas pasta cadastrada ou itens de
proIV é necessario a atualização do servidor caso contrario essa
atualização é dispensada
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000133-source">
<pre>
     <span class="ruby-comment cmt"># File app/controllers/banco_controller.rb, line 119</span>
119:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">concluirAtulizacaoBdProd</span>
120:     <span class="ruby-identifier">historico</span> = <span class="ruby-constant">Historico</span>.<span class="ruby-identifier">new</span>
121:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">attributes</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:historico</span>]
122:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">usuario_id</span> = <span class="ruby-constant">Goldberg</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>
123:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">historico</span>.<span class="ruby-identifier">requisicao_id</span>)
124:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">concluirAtulizacaoBdProd!</span>
125:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">estado</span> = <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">estado</span>
126:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">historicos</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">historico</span>
127:     <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">pasta?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">proiv_items</span>.<span class="ruby-identifier">collect</span>.<span class="ruby-identifier">empty?</span>
128:       <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">atualizaServidorProd!</span>
129:       <span class="ruby-identifier">historico2</span> = <span class="ruby-constant">Historico</span>.<span class="ruby-identifier">new</span>
130:       <span class="ruby-identifier">historico2</span>.<span class="ruby-identifier">observacao</span> = <span class="ruby-value str">'Transição Automatica'</span>
131:       <span class="ruby-identifier">historico2</span>.<span class="ruby-identifier">usuario_id</span> = <span class="ruby-constant">Goldberg</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>
132:       <span class="ruby-identifier">historico2</span>.<span class="ruby-identifier">estado</span> = <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">estado</span>
133:       <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">historicos</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">historico2</span>          
134:     <span class="ruby-keyword kw">else</span>
135:       <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">naoAtualizaServidorProd!</span>
136:       <span class="ruby-identifier">historico2</span> = <span class="ruby-constant">Historico</span>.<span class="ruby-identifier">new</span>
137:       <span class="ruby-identifier">historico2</span>.<span class="ruby-identifier">observacao</span> = <span class="ruby-value str">'Transição Automatica'</span>
138:       <span class="ruby-identifier">historico2</span>.<span class="ruby-identifier">usuario_id</span> = <span class="ruby-constant">Goldberg</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>
139:       <span class="ruby-identifier">historico2</span>.<span class="ruby-identifier">estado</span> = <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">estado</span>
140:       <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">historicos</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">historico2</span>    
141:     <span class="ruby-keyword kw">end</span>
142:     <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-value str">'Operação realizada com sucesso.'</span>        
143:     <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'home'</span>
144:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000124" class="method-detail">
        <a name="M000124"></a>

        <div class="method-heading">
          <a href="#M000124" class="method-signature">
          <span class="method-name">home</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000124-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000124-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/banco_controller.rb, line 15</span>
15:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">home</span>
16:     <span class="ruby-ivar">@requisicao_pages</span>, <span class="ruby-ivar">@requisicoes</span> = <span class="ruby-identifier">paginate</span>(<span class="ruby-identifier">:requisicoes</span>, <span class="ruby-identifier">:per_page</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">10</span>, 
17:                                   <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;estado = 'aguardandoAtualizacaoBdProd' or 
18:                                   estado = 'atualizacaoBdIniciadaProd' or
19:                                   estado = 'atualizacaoBdSuspensaProd' or 
20:                                   estado = 'aguardandoAtualizacaoBdCert' or 
21:                                   estado = 'atualizacaoBdIniciadaCert' or
22:                                   estado = 'atualizacaoBdSuspensaCert'                                                              
23:                                   &quot;</span>)
24:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000122" class="method-detail">
        <a name="M000122"></a>

        <div class="method-heading">
          <a href="#M000122" class="method-signature">
          <span class="method-name">index</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000122-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000122-source">
<pre>
   <span class="ruby-comment cmt"># File app/controllers/banco_controller.rb, line 2</span>
2:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">index</span>
3:     <span class="ruby-identifier">home</span>
4:     <span class="ruby-identifier">render</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'home'</span>
5:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000126" class="method-detail">
        <a name="M000126"></a>

        <div class="method-heading">
          <a href="#M000126" class="method-signature">
          <span class="method-name">iniciarAtualizacaoBdCert</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
O administrador de dados inicia a atualizacção do banco
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000126-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000126-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/banco_controller.rb, line 31</span>
31:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">iniciarAtualizacaoBdCert</span>
32:     <span class="ruby-identifier">historico</span> = <span class="ruby-constant">Historico</span>.<span class="ruby-identifier">new</span>
33:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">attributes</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:historico</span>]
34:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">usuario_id</span> = <span class="ruby-constant">Goldberg</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>
35:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">historico</span>.<span class="ruby-identifier">requisicao_id</span>)
36:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">iniciarAtualizacaoBdCert!</span>
37:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">estado</span> = <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">estado</span>
38:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">historicos</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">historico</span>
39:     <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-value str">'Operação realizada com sucesso.'</span>        
40:     <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'home'</span>
41:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000130" class="method-detail">
        <a name="M000130"></a>

        <div class="method-heading">
          <a href="#M000130" class="method-signature">
          <span class="method-name">iniciarAtualizacaoBdProd</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000130-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000130-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/banco_controller.rb, line 79</span>
79:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">iniciarAtualizacaoBdProd</span>
80:     <span class="ruby-identifier">historico</span> = <span class="ruby-constant">Historico</span>.<span class="ruby-identifier">new</span>
81:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">attributes</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:historico</span>]
82:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">usuario_id</span> = <span class="ruby-constant">Goldberg</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>
83:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">historico</span>.<span class="ruby-identifier">requisicao_id</span>)
84:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">iniciarAtualizacaoBdProd!</span>
85:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">estado</span> = <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">estado</span>
86:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">historicos</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">historico</span>
87:     <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-value str">'Operação realizada com sucesso.'</span>        
88:     <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'home'</span>
89:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000123" class="method-detail">
        <a name="M000123"></a>

        <div class="method-heading">
          <a href="#M000123" class="method-signature">
          <span class="method-name">show</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000123-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000123-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/banco_controller.rb, line 10</span>
10:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show</span>
11:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:id</span>])
12:     <span class="ruby-ivar">@events</span> = <span class="ruby-identifier">filtra_eventos</span>(<span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">next_events_for_current_state</span>)
13:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000128" class="method-detail">
        <a name="M000128"></a>

        <div class="method-heading">
          <a href="#M000128" class="method-signature">
          <span class="method-name">suspenderAtualizacaoBdCert</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000128-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000128-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/banco_controller.rb, line 56</span>
56:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">suspenderAtualizacaoBdCert</span>
57:     <span class="ruby-identifier">historico</span> = <span class="ruby-constant">Historico</span>.<span class="ruby-identifier">new</span>
58:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">attributes</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:historico</span>]
59:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">usuario_id</span> = <span class="ruby-constant">Goldberg</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>
60:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">historico</span>.<span class="ruby-identifier">requisicao_id</span>)
61:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">suspenderAtualizacaoBdCert!</span>
62:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">estado</span> = <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">estado</span>
63:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">historicos</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">historico</span>
64:     <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'home'</span>
65:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000131" class="method-detail">
        <a name="M000131"></a>

        <div class="method-heading">
          <a href="#M000131" class="method-signature">
          <span class="method-name">suspenderAtualizacaoBdProd</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000131-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000131-source">
<pre>
     <span class="ruby-comment cmt"># File app/controllers/banco_controller.rb, line 91</span>
 91:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">suspenderAtualizacaoBdProd</span>
 92:     <span class="ruby-identifier">historico</span> = <span class="ruby-constant">Historico</span>.<span class="ruby-identifier">new</span>
 93:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">attributes</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:historico</span>]
 94:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">usuario_id</span> = <span class="ruby-constant">Goldberg</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>
 95:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">historico</span>.<span class="ruby-identifier">requisicao_id</span>)
 96:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">suspenderAtualizacaoBdProd!</span>
 97:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">estado</span> = <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">estado</span>
 98:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">historicos</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">historico</span>
 99:     <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-value str">'Operação realizada com sucesso.'</span>        
100:     <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'home'</span>
101:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000125" class="method-detail">
        <a name="M000125"></a>

        <div class="method-heading">
          <a href="#M000125" class="method-signature">
          <span class="method-name">ultimas_req</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000125-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000125-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/banco_controller.rb, line 26</span>
26:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ultimas_req</span>
27:     <span class="ruby-ivar">@requisicao_pages</span>, <span class="ruby-ivar">@requisicoes</span> = <span class="ruby-identifier">paginate</span>(<span class="ruby-identifier">:requisicoes</span>, <span class="ruby-identifier">:per_page</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">10</span>, <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;estado = 'emCert' or  estado = 'escaladaCert'&quot;</span>)     
28:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>